# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=riemann-c-client
pkgver=2.1.0
pkgrel=0
pkgdesc="A C client library for the Riemann monitoring system"
url="https://git.madhouse-project.org/algernon/riemann-c-client"
arch="all"
license="LGPL-3.0-or-later"
depends_dev="protobuf-c-dev"
makedepends="$depends_dev
	autoconf
	automake
	json-c-dev
	libtool
	openssl-dev
	"
checkdepends="check-dev"
subpackages="
	$pkgname-libs
	$pkgname-dev
	$pkgname-doc
	"
source="$pkgname-$pkgver-2.tar.gz::https://git.madhouse-project.org/algernon/riemann-c-client/archive/riemann-c-client-$pkgver.tar.gz"
builddir="$srcdir/$pkgname"

prepare() {
	default_prepare

	autoreconf -iv
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-tls
	make
}

check() {
	make check
}

package() {
	make install DESTDIR="$pkgdir"
}

sha512sums="
63dadbed92ccb72fa402e1444190c2e8d8aa86fca23cb4d276d16137fabd589d71cc2cd65d1b22a54f3319bb3c7561f47f16203c49f1cbb336d5eb1022c582cc  riemann-c-client-2.1.0-2.tar.gz
"
